//package com.lw.common.timer;
//
//import net.javacrumbs.shedlock.core.LockProvider;
//import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.jdbc.core.JdbcTemplate;
//
//import javax.sql.DataSource;
//import java.util.TimeZone;
//
///**
// * shedlock定时器配置
// * 使用方式,参考SimpleTimer.java
// */
//@Configuration
//public class SchedulerLockConfig {
//    @Bean
//    public LockProvider lockProvider(DataSource dataSource) {
//        return new JdbcTemplateLockProvider(
//                JdbcTemplateLockProvider.Configuration.builder()
//                        .withJdbcTemplate(new JdbcTemplate(dataSource))
//                        .withTimeZone(TimeZone.getTimeZone("Asia/Shanghai"))
//                        .build()
//        );
//    }
//}
